#define _CRT_SECURE_NO_WARNINGS 1
int hmean(const int x, const int y, float* r)
{
    if (x + y == 0)
        return 0;
    float z = (float)2 * x * y / (x + y);
    *r = z;
    return 1;
}
int hmean(const int x, const int y, float& r)
{
    if (x + y == 0)
        return 0;
    float z = (float)2 * x * y / (x + y);
    r = z;
    return 1;
}
void getTime(int* h, int* m, int* s)
{
    time_t t;
    time(&t);
    long long totalSeconds = (long long)t;
    int curSecond = totalSeconds % 60;
    long long totalMinutes = totalSeconds / 60;
    int curMinute = totalMinutes % 60;
    long long totalHours = totalMinutes / 60;
    int curHour = totalHours % 24;
    *s = curSecond;
    *m = curMinute;
    *h = curHour;
}
unsigned int strLength(const char* s)
{
    for (int i = 0;; i++)
    {
        if (s[i] == '\0')
            return i;
    }
}
void strAppend(char* d, const char* s)
{
    int size = strLength(d);
    for (int i = 0;; i++)
    {
        d[size + i] = s[i];
        if (s[i] == '\0')
            return;
    }
}
void getTime(int& h, int& m, int& s)
{
    time_t t;
    time(&t);
    long long totalSeconds = (long long)t;
    int curSecond = totalSeconds % 60;
    long long totalMinutes = totalSeconds / 60;
    int curMinute = totalMinutes % 60;
    long long totalHours = totalMinutes / 60;
    int curHour = totalHours % 24;
    s = curSecond;
    m = curMinute;
    h = curHour;
}